Chinese Remainder Theorem
The Chinese remainder theorem is a statement about existence of solutions to a system of linear congruences. The problem originates from the book third century book Sun-tzu Suan-ching:
There are certain things whose number is unknown. If we count them by threes, we have two left over; by fives, we have three left over; and by sevens, two are left over. How many things are there?
The theorem is as follows:
Given moduli \(m_1, m_2, \dots, m_n\) which are pairwise coprime integers, and \(a_1, a_2, \dots, a_n \in \mathbb{Z}\), there is a unique solution modulo \(m = m_1 m_2 \dots m_n\) to the system of equations:
Note that the proof given below is non-constructive. For actually finding such a solution, see the chinese remainder theorem algorithm.
The core part of the result that needs to be proven is the following isomorphism of additive groups:
if \(\gcd(s, t) = 1\).
The full result then follows by induction.
This is equivalent to the decomposition of cyclic groups. It is proven here again to show the explicit isomorphism from \(\mathbb{Z}/n\mathbb{Z}\) to \(\mathbb{Z}/s\mathbb{Z} \oplus \mathbb{Z}/t\mathbb{Z}\), however the proof is otherwise identical, and is only repeated for convenience.
Note that this method does not give an explicit way to invert this isomorphism (that is what the chinese remainder theorem algorithm) is for.
Proof
Consider the homomorphism
given by
We will prove that this is an isomorphism simply by showing that the kernel is just the identity.
where step (1) is where the coprimality condition is used.